SCPositionRect
TheSCPositionRect
function positions a rectangle on the screen. You indicate where you want to put the rectangle by specifying the desired coordinates of the upper-left corner of the rectangle.
pascal ComponentResult SCPositionRect (ComponentInstance ci, Rect *rp, Point *where);
ci
- Identifies your application's connection to a standard image-compression dialog component.
rp
- Contains a pointer to a rectangle structure. When you call the
SCPositionRect
function, this structure should contain the rectangle's current global coordinates. TheSCPositionRect
function adjusts the coordinates in the structure to reflect the rectangle's new position.where
- Contains a pointer to a point in global coordinates identifying the desired location of the upper-left corner of the rectangle. This parameter allows your application to position the rectangle on the screen.
- The standard image-compression dialog component supports two special values for this parameter. If you set this parameter to (-1,-1), the component places the rectangle on the display device that has the menu bar. The component centers the rectangle horizontally on that device. The component vertically positions the rectangle so that 1/3 of the vertical space that is not used by the rectangle remains above the rectangle, and the remaining 2/3 of the unused space is below the rectangle.
- If you set this parameter to (-2,-2), the component places the rectangle
on the display device that supports the highest color or grayscale resolution. The component positions the rectangle as it does for the other special value. This option displays images most clearly and is the recommended value for most cases.- The
SCPositionRect
function adjusts the coordinates of this point to correspond to the upper-left corner of the rectangle.RESULT CODE
paramErr -50 Invalid parameter specified
Main | Top of Section | What's New | Apple Computer, Inc. | Find It | Feedback | Help